/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package yinshi.j2d;

import java.awt.Font;
import java.awt.Graphics2D;
import java.awt.font.FontRenderContext;
import java.awt.font.TextLayout;
import java.awt.geom.Point2D;
import java.awt.geom.Rectangle2D;

/**
 *
 * @author yinshi
 */
public class Text2D extends Leaf {

    private String text;
    private Font font = Font.getFont(Font.SANS_SERIF);

    public Text2D(String text) {
        this.text = text;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public void paint(Graphics2D g, int x, int y, int width, int height) {
        g.drawString(text, x, y);
    }
}
